# eric7.WebBrowser.UserAgent.UserAgentMenu

Module implementing a menu to select the user agent string.

### Global Attributes

None

### Classes

UserAgentMenu | Class implementing a menu to select the user agent string.

### Functions

None

## UserAgentMenu

Class implementing a menu to select the user agent string.

### Derived from

QMenu

### Class Attributes

None

### Class Methods

None

### Methods

UserAgentMenu | Constructor
__addDefaultActions | Private slot to add the default user agent entries.
__changeUserAgent | Private slot to change the user agent.
__populateMenu | Private slot to populate the menu.
__switchToDefaultUserAgent | Private slot to set the default user agent.
__switchToOtherUserAgent | Private slot to set a custom user agent string.

### Static Methods

None

#### UserAgentMenu (Constructor)

UserAgentMenu(title, url=None, parent=None)

Constructor

title (str)
  title of the menu
url (QUrl)
  URL to set user agent for
parent (QWidget)
  reference to the parent widget

#### UserAgentMenu.__addDefaultActions

__addDefaultActions()

Private slot to add the default user agent entries.

Return:
  flag indicating that a user agent entry is checked

Return Type:
  bool

#### UserAgentMenu.__changeUserAgent

__changeUserAgent(act)

Private slot to change the user agent.

act (QAction)
  reference to the action that triggered

#### UserAgentMenu.__populateMenu

__populateMenu()

Private slot to populate the menu.

#### UserAgentMenu.__switchToDefaultUserAgent

__switchToDefaultUserAgent()

Private slot to set the default user agent.

#### UserAgentMenu.__switchToOtherUserAgent

__switchToOtherUserAgent()

Private slot to set a custom user agent string.

Up